package com.twu.biblioteca;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * User: akerber
 * Date: 1/25/13
 * Time: 5:52 PM
 */
public class UserInputReader {


    public int processUserInputToInt() throws IOException {
        BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
        String optionSelected = bufferRead.readLine();
        return Integer.parseInt(optionSelected);
    }

    public String processUserInputBookName() throws IOException {
        System.out.println("Enter the name of the book you want to reserve: ");
        BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
        String optionSelected = bufferRead.readLine();
        return optionSelected;
    }

    public String processUserInputUsername() throws IOException {
        BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
        return bufferRead.readLine();
    }

    public String processUserInputPassword() throws IOException {
        BufferedReader bufferRead = new BufferedReader(new InputStreamReader(System.in));
        return bufferRead.readLine();
    }
}
